package cn.com.bluemoon.daps.system.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 发送
 *
 * @author Jarod.Kong
 */
@Data
public class NoticeSendRequestDto implements Serializable {

    @ApiModelProperty(value = "变更人")
    @NotEmpty(message = "变更人必填")
    private String changeUser;

    @ApiModelProperty(value = "所属系统")
    @NotEmpty(message = "系统必填")
    private String systemId;

    @ApiModelProperty(value = "变更表的Schema")
    @NotEmpty(message = "变更表schema必填")
    private String changeTableSchema;

    @ApiModelProperty(value = "变更表名")
    @NotEmpty(message = "变更表名必填")
    private String changeTableName;

    @ApiModelProperty(value = "变更脚本")
    @NotEmpty(message = "变更脚本必填")
    private String changeScript;

    @ApiModelProperty(value = "变更原因")
    @NotEmpty(message = "变更原因必填")
    private String changeReason;

    @ApiModelProperty(value = "归档表名")
    private String archiveTableName;

    @ApiModelProperty(value = "归档存储信息")
    private String archiveInfo;

    @ApiModelProperty(value = "影响分析的结果")
    @NotEmpty(message = "影响分析的结果必填")
    private String impactAnalysisResult;

    @ApiModelProperty(value = "变更类型 1-表变更 2-归档变更-表归档")
    @NotNull(message = "变更类型必填")
    private Integer changeType;

    @ApiModelProperty(value = "计划变更时间")
    @NotNull(message = "计划变更时间必填")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime planChangeTime;

    @ApiModelProperty(value = "收件人")
    @NotEmpty(message = "收件人必填")
    private List<String> receiveUserIds;

    @ApiModelProperty(value = "收件人邮箱", hidden = true)
    private List<String> receiveUserEmails;

    @ApiModelProperty(value = "抄送人邮箱", hidden = true)
    private List<String> ccUserEmails;

    @ApiModelProperty(value = "抄送人")
    private List<String> ccUserIds;

}
